package com.class05.ioc_01;

public class ClientService {
//    单例实际模式：饿汉式、懒汉式、生命周期托管式
//    1、饿汉式
    private static ClientService clientService = new ClientService();

    private ClientService(){

    }
    public static ClientService getInstance(){
//        静态方法内不能访问非静态成员
        return clientService;
    }

}
